﻿using PMS.Core.Configuration.CommonEnumConfigs;
using PMS.Web.Framework.Models;
using PMS.Web.Framework.Mvc.ModelBinding;
using System.Collections.Generic;
using System.ComponentModel;

namespace PMS.Web.Models.SystemModules
{
    /// <summary>
    /// Represents a systemmodule model
    /// </summary>
    public partial class SystemModuleModel : BaseEntityModel
    {
        public SystemModuleModel()
        {
            LimitedStoreIds = new List<int>();
        }

        [DisplayName("模块名称")]
        [NoTrim]
        public string Name { get; set; }

        [DisplayName("显示名称")]
        [NoTrim]
        public string DisplayName { get; set; }
        
        [DisplayName("功能简述")]
        public string ModuleDescription { get; set; }

        public int ModuleDepth { get; set; }

        [DisplayName("所属父级")] 
        public int ParentModuleId { get; set; }

        [DisplayName("选择图标")]
        public string HtmlIconCSSClass { get; set; }

        [DisplayName("Url地址")]
        [NoTrim]
        public string RouteUrl { get; set; }

        [DisplayName("所属店铺")]
        public IList<int> LimitedStoreIds { get; set; }
        
        [DisplayName("排序号")]
        public int DisplayOrder { get; set; }

        [DisplayName("打开方式")]
        public LinkOpenMode OpenMode { get; set; }

        [DisplayName("状态")]
        public bool IsActive { get; set; }

        /// <summary>
        /// AssignedButtons 决定系统模块有哪些可操作的按钮
        /// </summary>
        [DisplayName("模块按钮")]
        public IList<int> ModuleAssignedButtonIds { get; set; }

        /// <summary>
        /// AuthorizedButtons决定角色对应的系统模块所分配的操作按钮是否有操作权限
        /// </summary>
        public IList<int> ModuleAuthorizedButtonIds { get; set; }
    }
}
